package com.csproj.system.service.dto;


import com.fasterxml.jackson.annotation.JsonFormat;

import java.time.ZonedDateTime;
import java.io.Serializable;
import java.util.Objects;

/**
 * A DTO for the SysLogs entity.
 */
public class SysLogsDTO implements Serializable {

    private String id;

    private String rendId;

    private String moduleType;

    private String description;

    private String userInfoId;

    private String operationType;

//    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private ZonedDateTime creationTime;

    private String remark;

    private String creatorUserId;

    private String roleInfoIds ;

    //extends username and rolename

    private String userName;

    private String roleName;

    public String getUserName() {
        return userName;
    }

    public void setUserName(String userName) {
        this.userName = userName;
    }

    public String getRoleName() {
        return roleName;
    }

    public void setRoleName(String roleName) {
        this.roleName = roleName;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRendId() {
        return rendId;
    }

    public void setRendId(String rendId) {
        this.rendId = rendId;
    }

    public String getModuleType() {
        return moduleType;
    }

    public void setModuleType(String moduleType) {
        this.moduleType = moduleType;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public String getUserInfoId() {
        return userInfoId;
    }

    public void setUserInfoId(String userInfoId) {
        this.userInfoId = userInfoId;
    }

    public String getOperationType() {
        return operationType;
    }

    public void setOperationType(String operationType) {
        this.operationType = operationType;
    }

    public ZonedDateTime getCreationTime() {
        return creationTime;
    }

    public void setCreationTime(ZonedDateTime creationTime) {
        this.creationTime = creationTime;
    }

    public String getRemark() {
        return remark;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }

    public String getCreatorUserId() {
        return creatorUserId;
    }

    public void setCreatorUserId(String creatorUserId) {
        this.creatorUserId = creatorUserId;
    }


    public String getRoleInfoIds() {
        return roleInfoIds;
    }

    public void setRoleInfoIds(String roleInfoIds) {
        this.roleInfoIds = roleInfoIds;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (o == null || getClass() != o.getClass()) {
            return false;
        }

        SysLogsDTO sysLogsDTO = (SysLogsDTO) o;
        if(sysLogsDTO.getId() == null || getId() == null) {
            return false;
        }
        return Objects.equals(getId(), sysLogsDTO.getId());
    }

    @Override
    public int hashCode() {
        return Objects.hashCode(getId());
    }

    @Override
    public String toString() {
        return "SysLogsDTO{" +
            "id=" + getId() +
            ", rendId='" + getRendId() + "'" +
            ", moduleType='" + getModuleType() + "'" +
            ", description='" + getDescription() + "'" +
            ", userInfoId='" + getUserInfoId() + "'" +
            ", operationType='" + getOperationType() + "'" +
            ", creationTime='" + getCreationTime() + "'" +
            ", remark='" + getRemark() + "'" +
            ", creatorUserId='" + getCreatorUserId() + "'" +
            "}";
    }
}
